import java.util.Stack;
/**
 * Created with Intellij IDEA
 * Description
 * User:ASUS
 * Date:2024-09-11
 * Time:20:33
 */
public class Main {
    public static void main(String[] args) {
        Stack<Integer> stack = new Stack<>();
        stack.push(1);
        stack.push(2);
        stack.push(3);
        System.out.println(stack.size());
        System.out.println(stack.peek());
        stack.pop();
        System.out.println(stack.pop());
        if(stack.empty()){
            System.out.println("栈空");
        }else{
            System.out.println(stack.size());
        }
    }
}
